home *** CD-ROM | disk | FTP | other *** search
/ Publication 6 / Publication_06_19xx_High-Tech_de_Side_B.d64 / reaktionstest! (.txt) < prev    next >
Commodore BASIC  |  2023-02-26  |  4KB  |  117 lines

  1. 10 rem *****************************
  2. 20 rem * reaktionstest v1.4-pd     *
  3. 22 rem *                           *
  4. 30 rem * (c) by g.zwank            *
  5. 32 rem *        berscheider str.22 *
  6. 34 rem *        5529 geichlingen   *
  7. 36 rem *        tel. 06566/8454    *
  8. 38 rem *                           *
  9. 40 rem * geichlingen,10.01.1984    *
  10. 50 rem *****************************
  11. 150 :
  12. 160 rem costruction:c64 + sw-monitor + verstaerker . c64 + fernsehgeraet
  13. 170 :
  14. 172 rem farbeinstellungen
  15. 175 poke53280,0:poke53281,0:print"[147]";
  16. 182 :
  17. 184 rem variblendefinition
  18. 190 sc=54272:fl=sc:fh=sc+1:wf=sc+4:an=sc+5:ha=sc+6:vl=sc+24:bh=53281:cf=.1028
  19. 205 pokean,0:pokeha,240:pokefh,58:pokefl,138
  20. 218 k1$="[147]reaktionstest":k2$="----------------------------------------"
  21. 220 dimp1$(3),p2$(3),p3$(3):p1$(1)="optisch   ":p1$(2)="akkustisch"
  22. 225 p1$(3)="kombiniert":p2$(1)="klein":p2$(2)="mittel":p2$(3)="gross"
  23. 226 p3$(1)="gross":p3$(2)="mittel":p3$(3)="klein":p1$="------------":hs$="   "
  24. 230 p2$="[163][163][163][163][163]"
  25. 231 :
  26. 232 rem titel
  27. 233 print"[147]       r e a k t i o n s t e s t"
  28. 234 print"       -------------------------                "
  29. 235 print"(c) by g.zwank[145]"
  30. 236 fors=1to3:n=int(rnd(1)*750):fort=1ton:next:poke53281,1:pokevl,15:pokewf,17
  31. 237 fort=1to75:next:poke53281,0:pokewf,0:pokevl,0:next:fort=1to1000:next
  32. 238 :
  33. 239 rem parametereingabe
  34. 240 tg=0:vr=0:kn=999:gn=0:ft=5
  35. 250 printk1$"/parametereingabe":printk2$
  36. 260 input"anzahl der durchgaenge......";nn$:nn=val(nn$):nn$=""
  37. 270 ifnn=0then250
  38. 280 print"signal (optisch    - 1)":print"       (akkustisch - 2)"
  39. 290 print"       (kombiniert - 3).....? ";
  40. 300 gosub700:sf=i:printp1$(i)
  41. 320 onigoto330,340,345
  42. 330 ox=1:ax=0:lx=0:goto350
  43. 340 ox=0:ax=17:lx=15:goto350
  44. 345 ox=1:ax=17:lx=15
  45. 350 gosub720
  46. 351 print"rnd-zeitanteil (klein  - 1)":printtab(15)"(mittel - 2)"
  47. 352 printtab(15)"(gross  - 3) ? ";
  48. 353 gosub700:tf=i:printp2$(i)
  49. 354 onigoto355,356,357
  50. 355 tc=191:tr=146:goto358
  51. 356 tc=101:tr=240:goto358
  52. 357 tc=25:tr=391
  53. 358 gosub720
  54. 359 print"pause (gross  - 1)":printtab(6)"(mittel - 2)"
  55. 360 printtab(6)"(klein  - 3)..........? ";
  56. 361 gosub700:ff=i:printp3$(i)
  57. 362 onigoto364,369,363
  58. 363 tc=tc*.5:tr=tr*.5:goto365
  59. 364 tc=tc*1.3:tr=tr*1.3
  60. 365 gosub730
  61. 369 print"           [164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164]"
  62. 370 print"            taste druecken [146]"
  63. 380 geti$:ifi$<>""then390
  64. 385 ft=ft+1:ifft=20thenft=0:goto670
  65. 387 goto380
  66. 388 :
  67. 389 rem start-testroutine
  68. 390 print"[147]             a c h t u n g":printtab(13)"-------------"
  69. 400 forn=1tonn
  70. 410 t=tc+int(rnd(1)*tr)
  71. 420 fortt=1tot:geti$:ifi$<>""thenprinttab(17)"[  0]*":vr=vr+1:goto410
  72. 430 next
  73. 440 pokevl,lx:pokewf,ax:pokebh,ox
  74. 445 fort=1to1000:geti$:ifi$=""thennext:goto750
  75. 455 tt=t:t=1000:next:t=tt
  76. 460 pokewf,0:pokevl,0:pokebh,0
  77. 480 tg=tg+t:ift<knthenkn=t
  78. 490 ift>gnthengn=t
  79. 500 oa=t:gosub760:t=oa:tm$=str$(t):tm$=right$(hs$,4-len(tm$))+tm$
  80. 505 printtab(17)tm$"]":print"[145]"tab(17)"[":next
  81. 510 printtab(16)"e n d e":printtab(16)"-------":fort=1to1500:next
  82. 511 :
  83. 512 rem auswertung
  84. 513 tg=int(tg/(nn*cf))/10:iftg-int(tg)=>.5thentg=int(tg)+1:goto515
  85. 514 tg=int(tg)
  86. 515 oa=kn:gosub760:kn=oa:oa=gn:gosub760:gn=oa
  87. 520 tp$=left$(p2$,len(str$(tg)))+"[163][163][163][163][163][163][163]"
  88. 530 printk1$"/auswertung":printk2$:ifnn>1then532
  89. 531 print"1 durchgang":goto550
  90. 532 p$=left$(p1$,len(str$(nn)))
  91. 540 print"[157]"nn"durchgaenge"
  92. 550 print"signal         : ";p1$(sf):print"rnd-zeitanteil : ";p2$(tf)
  93. 555 print"pause          : ";p3$(ff)
  94. 570 print"mittlere zeit  :";tg;"[157]/200 sec"
  95. 575 printtab(17)tp$
  96. 580 print"laengste zeit  :";gn;"[157]/200 sec"
  97. 590 print"kuerzeste zeit :";kn;"[157]/200 sec"
  98. 600 print"fehlversuche   :";:ifvr=0thenprint" keine":goto610
  99. 605 printvr
  100. 610 gosub740:print"weiter (j/n) ? ";:
  101. 620 geti$:ifi$="j"thenprinti$;:gosub730:goto240
  102. 630 ifi$<>"n"then620
  103. 640 printi$;:gosub730:print"[147]programmende":end
  104. 645 :
  105. 646 rem unterroutinen
  106. 670 iffs=1thenfs=-1:goto369
  107. 680 fs=1:print"[145][145]                           ":print"                           "
  108. 690 goto380
  109. 700 geti$:i=val(i$):ifi<1ori>3then700
  110. 710 return
  111. 720 fors=1to250:next:return
  112. 730 fors=1to500:next:return
  113. 740 fors=1to3000:next:return
  114. 750 printtab(17)"[999]n":pokewf,0:pokevl,0:pokebh,0:goto410
  115. 760 oa=int(oa/cf)/10:ifoa-int(oa)=>.5thenoa=int(oa)+1:return
  116. 770 oa=int(oa):return
  117.